﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using onHaj.Code.BusinessLogic;

namespace WebDesignExpressions
{
    public partial class I : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            TodayLable.Text = DateTime.Now.ToString("dd MMMM, yyyy");
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            onSoftMail mail = new onSoftMail(HttpContext.Current);
            var messageParameters = new Dictionary<string, string>();
            messageParameters.Add("{Name}", dfsName.Text);
            messageParameters.Add("{E-mail}", dfsEmail.Text);
            messageParameters.Add("{Company}", dfsCompanyName.Text);
            messageParameters.Add("{AccountNo}", DDLAccountNo.Text);
            messageParameters.Add("{InvoiceNo}", dfsInvoiceNo.Text);
            messageParameters.Add("{Date}", TodayLable.Text);
            messageParameters.Add("{Domain}", DropDownList1.Text);
            messageParameters.Add("{JobDesc}", dfsDesc.Text);
            messageParameters.Add("{Amount}", dfsAmount.Text);
            messageParameters.Add("{Total}", dfsTotal.Text);



            mail.SendMail(@"html/Invoice.htm", dfsEmail.Text, dfsCompanyName.Text + "  Invoice", messageParameters);
            mail.SendMail(@"html/Invoice.html", "web@bpwe.net", "Invoice", messageParameters);
            Response.Redirect("default.aspx");
        }
    }
}